@extends('front.common.header')

@section('title', '就业指南')

@section('header')
<link rel="stylesheet" type="text/css" href="{{ asset('css/employ/list.css') }}" />
<link rel="stylesheet" type="text/css" href="{{ asset('css/employ/index.css') }}" />
<link href="{{ asset('/css/company/jobs.css') }}" rel="stylesheet" type="text/css">
<script src="{{ asset('/js/company/search.js') }}"></script>

<div class="header">
    <div class="header-main">
        <div class="logo float-l">
            <a href="{{ url('/') }}">
                <img src="{{asset('/images/front/sy/logo.png')}}">
            </a>
        </div>
        <div class="header-content float-l">
            <div class="header-search">
                <div id="jobs_searchsort">
                    <div class="selectedsort">
                        <span class="itemName" id="itemName" name="itemName">类别</span>
                        <span class="sortico"></span>
                    </div>
                    <div class="searchsortlist">
                        <div class="searchItem">机构</div>
                        <div class="searchItem">课程</div>
                        <div class="searchItem">职位</div>
                        <div class="searchItem">企业</div>
                    </div>
                </div>
                <input type="text"   id="jobs_keyword" style="width:77%;" name="keyword" placeholder="搜索课程、公司等关键词" value=""/>
                <input type="submit" id="jobs_searchbtn" value="" />
            </div>
            <script type="text/javascript">JobsSearch();</script>
        </div>
        <div class="header-user float-l margin-l-30">
            <div class="user-icon float-l" @if(empty($authuser)) onclick="ShowLogin('MyDiv','fade')"@else @if($authuser->group_id == 2) onclick="CompanyUrl()" @else onclick="MemberUrl()" @endif @endif>
               @if(!empty($authuser))
                <img src="{{ userlogo($authuser->id,'small') }}" alt="">
                @else
                <img src="{{asset('/images/front/sy/geren.png')}}" alt="">
                @endif 
                @if($unread>0)<div class="tips">{{$unread}}</div>@endif 
            </div>
            <div class="down-trip float-r">
              <img src="{{asset('/images/front/sy/xiala.png')}}" alt="">
            </div>
        @if(!empty($authuser))
        @if($authuser->group_id == 3)
        <ul class="dropdown-menu-user">
            <li><a href="{{url('/member/resume')}}"><i class="icon-user"></i>&nbsp;&nbsp;我的简历</a></li>
            <li class="bodertop"><a href="{{url('/member/delivery')}}"><i class="icon-folder-close"></i>&nbsp;&nbsp;我的工作</a></li>
            <li class="bodertop"><a href="{{url('/member/index')}}"><i class="icon-upload-alt"></i>&nbsp;&nbsp;我的上传</a></li>
            <li class="bodertop"><a href="{{url('/member/comments')}}"><i class="icon-comments"></i>&nbsp;&nbsp;我的评论</a></li>
            <li class="bodertop">
                <a href="{{url('/member/message')}}">
                    <i class="icon-envelope-alt"></i>&nbsp;&nbsp;我的私信
                    <span class="badge">{{ $unread?:'' }}</span>
                </a>
            </li>
            <li class="bodertop"><a href="{{url('/member/account')}}"><i class="icon-cogs"></i>&nbsp;&nbsp;账号设置</a></li>
            <li class="bodertop"><a href="/logout"><i class="icon-off"></i>&nbsp;&nbsp;退出</a></li>
        </ul>
        @elseif($authuser->group_id == 2)
        <ul class="dropdown-menu-user">
            <li><a href="/company/center"><i class="icon-user"></i>&nbsp;&nbsp;企业管理</a></li>
            <li class="bodertop"><a href="/company/center/jobs-all"><i class="icon-folder-close"></i>&nbsp;&nbsp;全部职位</a></li>
            <li class="bodertop"><a href="/company/center/resume-all"><i class="icon-upload-alt"></i>&nbsp;&nbsp;全部简历</a></li>
            <li class="bodertop"><a href="/company/center/comments-all"><i class="icon-comments"></i>&nbsp;&nbsp;全部评论</a></li>
            <li class="bodertop"><a href="/company/center/message"><i class="icon-envelope-alt"></i>&nbsp;&nbsp;全部私信<span class="badge">{{ $unread?:'' }}</span></a></li>
            <li class="bodertop"><a href="/company/center/companyinfo-default"><i class="icon-cogs"></i>&nbsp;&nbsp;企业信息</a></li>
            <li class="bodertop"><a href="/logout"><i class="icon-off"></i>&nbsp;&nbsp;退出</a></li>
        </ul>
        @elseif($authuser->group_id == 1)
        <ul class="dropdown-menu-user">
            <li><a href="{{url('/member/resume')}}"><i class="icon-user"></i>&nbsp;&nbsp;我的简历</a></li>
            <li class="bodertop"><a href="{{url('/member/delivery')}}"><i class="icon-folder-close"></i>&nbsp;&nbsp;我的工作</a></li>
            <li class="bodertop"><a href="{{url('/member/index')}}"><i class="icon-upload-alt"></i>&nbsp;&nbsp;我的上传</a></li>
            <li class="bodertop"><a href="{{url('/member/comments')}}"><i class="icon-comments"></i>&nbsp;&nbsp;我的评论</a></li>
            <li class="bodertop"><a href="{{url('/member/message')}}"><i class="icon-envelope-alt"></i>&nbsp;&nbsp;我的私信<span class="badge">{{ $unread?:'' }}</span></a></li>
            <li class="bodertop"><a href="{{url('/member/account')}}"><i class="icon-cogs"></i>&nbsp;&nbsp;账号设置</a></li>
            <li class="bodertop"><a href="/admin/index"><i class="icon-cogs"></i>&nbsp;&nbsp;后台管理</a></li>
            <li class="bodertop"><a href="/logout"><i class="icon-off"></i>&nbsp;&nbsp;退出</a></li>
        </ul>
        @endif
        @endif
        </div>
        <div class="clearfix"></div>
    <div id="fade" class="black_overlay"></div>
    <div class="flip-container white_content" id="MyDiv" ontouchstart="this.classList.toggle('hover');">
        <div class="login-div" id="login-div">
            <div class="loginclose" onclick="CloseLogin('MyDiv','fade')"><i class="icon-remove"></i></div>
            <div class="to-login" id="to-login">
                <form action="" id="login-form-new">
                    <div class="form-group">
                        <input type="text" name="username" class="form-control" placeholder="邮箱／手机">
                    </div>
                    <div class="form-group">
                        <input type="password" name="password" class="form-control" placeholder="密码">
                    </div>
                    <div class="form-group">
                        <div class="col-sm-8">
                            <div class="checkbox fl">
                                <label>
                                    <input type="checkbox" name="is_remember"> <span>记住我</span>
                                </label>
                            </div>
                        </div>
                        <div class="col-sm-4 fr">
                            <div class="foget-pwd"><a href="#">忘记密码？</a></div>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                    {!! csrf_field() !!}
                    <div class="form-group mt10">
                        <button class="btn login-action" type="button" id="login-action-new">登&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;陆</button>
                    </div>
                </form>
                <div class="form-group text-right">
                    <span>还没有青苜帐号</span>&nbsp;
                    <a href="javascript:void(0)" id="go-to-register">点击注册<i class="icon-double-angle-right"></i></a>
                </div>
            </div>
        </div>
        <div class="register-div" id="register-div">
            <div class="loginclose" onclick="CloseLogin('MyDiv','fade')"><i class="icon-remove"></i></div>
            <div class="to-login" id="to-register">
                <form action="" id="register-form">
                    <div class="form-group">
                        <div class="register-tab active float-l" id="personal">
                            我是人才
                            <div class="register-checked"><img alt="" src="{{asset('/images/front/index/register-selected.png')}}"></div>
                        </div>
                        <div class="register-tab float-r" id="enterprise">
                            我是企业
                            <div class="register-checked" style="display: none"><img alt="" src="{{asset('/images/front/index/register-selected.png')}}"></div>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                    <input type="hidden" name="user_type" value="0">
                    {!! csrf_field() !!}
                    <div id="step_1">
                        <div class="form-group">
                            <input type="text" name="username" class="form-control" placeholder="邮箱／手机">
                        </div> 
                        <div class="form-group reg-small-group clearfix">
                            <input type="text" name="verify_code" class="form-control float-l" placeholder="我不是机器人">
                            <div class="float-r verify-img">
                                <img src="{{ url('captcha') }}" onclick="this.src='{{ url('captcha') }}?r='+Math.random();" width="100%" height='43' alt="点击刷新验证码">
                            </div>
                        </div>
                        <div class="form-group reg-small-group clearfix">
                            <input type="number" name="phone_code" class="form-control float-l" placeholder="请输入验证码" >
                            <button class="float-r curl-code selected" type="button"  id="to_verify" onclick="getverify('register-form')">
                                <span class="color-3 hide font-16" id="counter">60S</span>
                                <span id="counter_cnt">获取验证码</span>
                            </button>
                        </div>
                        <div class="form-group mt10">
                            <button class="btn login-action" disabled="disabled" type="button" id="jump_next">下&nbsp;&nbsp;一&nbsp;&nbsp;步</button>
                        </div>
                    </div>
                    <div id="step_2" style="display:none">
                        <div class="form-group">
                            <input type="password" name="password" class="form-control" placeholder="密码">
                        </div>
                        <div class="form-group">
                            <input type="password" name="repassword" class="form-control" placeholder="确认密码">
                        </div>
                        <div class="form-group height-30">
                            <div class="col-sm-10">
                                <div class="checkbox fl">
                                    <label>
                                      <input type="checkbox" name="is_remember"> 
                                      <span>我已阅读并同意</span>
                                      <a href="#"><span class="color-green">《青苜用户协议》</span></a>
                                    </label>
                                </div>
                            </div>
                            <div class="clearfix"></div>
                        </div>
                        <div class="form-group mt10">
                            <button class="btn login-action" type="button" id="register-action">注&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;册</button>
                        </div>
                    </div>
                </form>
                <div class="form-group text-right"><span>已有青苜帐号？</span>&nbsp;<a href="javascript:void(0)" id="go-to-login">立即登陆<i class="glyphicon glyphicon-chevron-right"></i></a></div>
            </div>
        </div>
    </div>

</div>
    <div class="employ-nav">
        <div class="category-nav float-l">
            <img src="{{ asset('/images/front/jyzn/all.png')}}">
			<span class="all_cate">所有分类</span>
        </div>
        <div class="employ-nav-list">
            <ul >
    			<li><a href="/">首页</a></li>
    			<li class="curr active"><a href="{{ url('/employ') }}">就业指南</a></li>
    			<li><a href="{{ url('/teaches') }}">充电加油</a></li>
    			<li><a href="{{ url('/company') }}">企业招聘</a></li>
    			<li><a href="{{url('/bbs')}}">青苜社区</a></li>
    			<div class="clearfix"></div>
    		</ul>
        </div>
    </div>
</div>
@stop

@section('content')
<div class="main">
    <div class="banner" onMouseOver="preNextShow()" onMouseOut="preNextHide()">
		<ul>
			@foreach($banners as $banner)
			<li><img src="@if(count($banner->attachment->url)>0){{$banner->attachment->url}}@else{{ asset('/images/front/jyzn/bn.png') }}@endif" style=""></li>
			@endforeach
		</ul>
		<script type="text/javascript">
			$(function(){
				var slidey = $('.banner').unslider({
				  speed: 500,			   
				  delay: 3000,			
				  complete: function() {}, 
				  keys: true,			 
				  dots: true,			  
				  fluid: false
				});
    			data = slidey.data('unslider'); 
    			data.move(2, function() {}); 
				$(".banner").css('width',"100%");
			})
		</script>
		<div class="employ-category">
            <div class="employ-category-content">
                <div class="category-list float-l">
                    <ul>
                        @foreach ($emp_cates as $key => $cat)
                        <li @if($key>=1) class="border-top" @endif>
                            <div class="category-employ">
                                <div class="category-first">
                                    <div class="category-name float-l">{{ str_limit($cat['name'],16) }}</div>
                                    <div class="category-more float-r"><i class="icon-angle-right"></i></div>
                                    <div class="clearfix"></div>
                                </div>
                                <div class="category-child">
                                    @foreach ($cat['child'] as $subcat)
                                    <div class="category-name float-l">
                                        <a href="{{url('/employ/list?cateid='.$cat['id'].'&secondid='.$subcat['id'])}}">{{ str_limit($subcat['name'],8) }}</a>
                                    </div>
                                    @endforeach
                                </div>
                                
                            </div>
                        </li>
                        @endforeach
                        <div class="clearfix"></div>
                    </ul>
                </div>
                <div class="unslider-arrow prev banner-previous float-l hide"></div>
                <div class="category-tips float-r">
                    <div class="category-tips-list">
                        <p><a href="#" class="menu_a">1000条行业常识</a></p>
                        <p><a href="#" class="menu_a">1000条行业常识</a></p>
                        <p><a href="#" class="menu_a">1000条行业常识</a></p>
                    </div>
                    <div class="category-up-button">
                        <a @if(empty($authuser)) href="javascript:void(0)" onclick="loginTips()"@else href="{{ url('/member/index/create') }} " target="_blank" @endif>
                            <img src="{{ asset('/images/front/jyzn/UP.png')}}">
                            <span class="font-18 color-green">我要投稿</span>
                        </a>
                    </div>
                </div>
                <div class="unslider-arrow next float-r banner-next hide"></div>
                <div class="clearfix"></div>
                <script type="text/javascript">
    				var unslider = $('.banner').unslider();
    				$('.unslider-arrow').click(function() {
    					var fn = this.className.split(' ')[1];
    					 //  Either do unslider.data('unslider').next() or .prev() depending on the className
    					unslider.data('unslider')[fn]();
    				 });
      				 function preNextShow(){
       					$(".unslider-arrow").removeClass('hide');
          			 }
          			 function preNextHide(){
           				$(".unslider-arrow").addClass('hide');
                     }
				</script>
            </div>
        </div>
    </div>
    
    <div class="content margin-t-10">
        <div class="employ-list-left employ-index-left float-l">
            <div class="employ-search">
                <div class="employ-div-title">
					<span>热门精华</span>
    				<span class="more color-4 font-16">
    					<a href="{{url('/employ/list')}}">更多
							<i class="icon-circle font-16 more-circle">
							 <i class="icon-angle-right more-right"></i>
							</i>
    					</a>
    				</span>
                </div>
                <div class="employ-index-list">
                    @foreach ($hot_news as $key => $zn)
                    <div class="index-list-info float-l" @if($key==2) style="margin-right:0"@endif>
                        <div class="employ-img">
                            <a href="{{ url('/employ/'.$zn->id) }}">
                                <img src="{{count($zn->attachment)>0?$zn->attachment->url:''}}" width="295" height="200">
                            </a>
                            <div class="employ-img-title">
    							<a href="{{ url('/employ/'.$zn->id) }}"><span class="category-name">{{str_limit($zn->title,20)}}</span></a>
    							<i class="icon-circle color-white font-8"></i>
                                <a href="/employ/list?cateid={{count($zn->category->parentCate)>0?$zn->category->parentCate->cat_id:$zn->category->pid}}=&lastid={{$zn->category->cat_id}}">
    							 <span class="employ-name">{{$zn->category->cat_name}}</span>
    							</a>
                            </div>
                        </div>
                        <div class="employ-other-info">
                            <div class="employ-exts text-right float-l">
                                <p>
                                    <span class="color-orange">{{ $zn->reading_num}}</span>
                                    <span class="color-3">阅读</span>&nbsp;|&nbsp;
                                    <span class="color-orange">{{ $zn->comment_num}}</span>
                                    <span class="color-3">评论</span>&nbsp;|&nbsp;
                                    <span class="color-orange">{{ $zn->recommond_num}}</span>
                                    <span class="color-3">收藏</span>
                                </p>
                                <p><span class="color-gray2">作者：{{$zn->user->name}}</span></p>
                            </div>
                            <div class="employ-user-icon float-r cp" @if(empty($authuser)) onclick="loginTips()" @elseif($authuser->id == $zn->user->id ) onclick="messageTips()" @else onclick="message('/message?ruid={{$zn->user->id}}','{{ csrf_token() }}')" @endif>
                                <img src="{{userlogo($zn->user->id,'middle')}}">
                            </div>
                            <div class="clearfix"></div>
                        </div>
                    </div>
                    @endforeach
                    <div class="clearfix"></div>
                </div>    
            </div>
    <!-- 私信弹框 -->
    <div class ="modal fade bs-example-modal-sm" id="myMessageDetail" tabindex ="-1" role ="dialog" aria-labelledby ="mySmallModalLabel">
        <div class ="modal-dialog modal-sm">
            <div class ="modal-content">
                <div style="" class="letter_big">
                    <form id="messageForm">
                        <div class="letter_h" >
                            <button type="button" class="close msgbtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="font-18">&times;</span></button>
                            <h4 class="modal-title title" id="myModalLabel">YueGuang光</h4>
                        </div>
                        <div class="user_talk clearfix" id="message_content">

                        </div>
                        <div class="talk_res">
                            <textarea class="talk_area" name="content" id="msgContent"></textarea>
                        </div>
                        <div class="clearfix"></div>
                        <div class="talk_bottom">
                            {!! csrf_field() !!}
                            <button class="res_but" type="button" id="messge_send">回复</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>

    @foreach($category as $key=>$cate)
            @if($key < 2)
            <div class="employ-search mt-10">
                <div class="employ-div-title">
					<span>{{$cate->cat_name}}</span>
    				<span class="more color-4 font-16">
    					<a href="{{ url('/employ/list?cateid='.$cate->cat_id) }}">更多
							<i class="icon-circle font-16 more-circle">
							 <i class="icon-angle-right more-right"></i>
							</i>
    					</a>
    				</span>
                </div>
                <div class="employ-div-line">
                    @foreach ($employ[$cate->cat_id] as $k => $zn)
                    <div class="employ-second-list float-l @if($k==0 || $k ==2) boder-right @endif  @if($k>1) bodertop @endif">
                        <div class="employ-second-list-content">
                            <div class="employ-second-content">
                                <div class="second-content-img float-l">
                                    <a href="{{ url('/employ/'.$zn->id) }}"><img src="@if(count($zn->attachment)>0){{$zn->attachment->url}}@endif" width="228" height="142"></a>
                                </div>
                                <div class="second-other-info float-r">
                                    <p>
                                        <a href="{{ url('/employ/'.$zn->id) }}">
                                            <span class="font-18 color-green">{{str_limit($zn->title,24)}}</span>
                                        </a>
                                    </p>
                                    <p>
                                        @if(count($zn->category)>0)
                                        <a href="{{ url('/employ/list?cateid='.$cate->cat_id.'&lastid='.$zn->category->cat_id) }}">
                                        @else
                                        <a href="{{ url('/employ/list?cateid='.$cate->cat_id) }}">
                                        @endif
            							<span class="color-gray2 font-16">{{count($zn->category)>0?$zn->category->cat_name:''}}</span>
        							    </a>
                                    </p>
                                    <p style="margin:0;">
                                        <img src="{{ asset('/images/front/jyzn/eye.png') }}">
                                        <span class="font-12 color-gray2">{{count($zn->exts)>0?$zn->exts->reading_num:0}}</span>
                                        <img src="{{ asset('/images/front/jyzn/c.png') }}" style="margin-left:30px">
                                        <span class="font-12 color-gray2">{{count($zn->exts)>0?$zn->exts->comment_num:0}}</span>
                                    </p>
                                </div>
                                <div class="clearfix"></div>
                        </div>
                        </div>
                    </div>
                    @endforeach
                    <div class="clearfix"></div>
                </div>
            </div>
            @else
            <div class="employ-search mt-10">
                <div class="employ-div-title">
					<span>{{$cate->cat_name}}</span>
    				<span class="more color-4 font-16">
    					<a href="{{ url('/employ/list?cateid='.$cate->cat_id) }}">更多
							<i class="icon-circle font-16 more-circle">
							 <i class="icon-angle-right more-right"></i>
							</i>
    					</a>
    				</span>
                </div>
                <div class="employ-div-line">
                    @foreach ($employ[$cate->cat_id] as $k => $zn)
                    <div class="employ-third-list float-l @if($k!=2 || $k!=5) boder-right @endif @if($k>2) bodertop @endif">
                        <div class="employ-third-content @if($k>2) margin40 @endif">
                            <div class="third-content-img">
                                <a href="{{ url('/employ/'.$zn->id) }}"><img src="{{count($zn->attachment)>0?$zn->attachment->url:''}}" width="256" height="170"></a>
                            </div>
                            <div class="third-other-info mt-10">
                                <p class="font-18 color-gray2">
                                    <a href="{{ url('/employ/'.$zn->id) }}">
                                        {{str_limit($zn->title,40)}}
                                    </a>
                                </p>
                                <p class="font-14 color-gray2">
                                   @if(count($zn->category)>0)
    								@if(count($zn->category->parentCate)>0)
    									@if(count($zn->category->parentCate->parentCate)>0)
                                          <a href="{{ url('/employ/list?cateid='.$zn->category->parentCate->parentCate->cat_id) }}">
    										<span class="color-green">  {{$zn->category->parentCate->parentCate->cat_name}}</span>
    								      </a>
    										-
    									  <a href="{{ url('/employ/list?cateid='.$zn->category->parentCate->parentCate->cat_id.'&secondid='.$zn->category->parentCate->cat_id) }}">
    										<span class="color-green">  {{$zn->category->parentCate->cat_name}} </span>
    								      </a>
    										- 
    								      <a href="{{ url('/employ/list?cateid='.$zn->category->parentCate->parentCate->cat_id.'&secondid='.$zn->category->parentCate->cat_id.'&lastid='.$zn->category->cat_id) }}">
    										{{$zn->category->cat_name}}
                                          </a>
    									@else
                                         <a href="{{ url('/employ/list?cateid='.$zn->category->parentCate->cat_id.'&secondid='.$zn->category->cat_id) }}">
    									   <span class="color-green">  {{$zn->category->parentCate->cat_name}} </span>
    									   -
    									   {{$zn->category->cat_name}}
                                          </a>
    									@endif
    								@else
                                    <a href="{{ url('/employ/list?cateid='.$zn->category->cat_id) }}">
    								  <span class="color-green">  {{ $zn->category->cat_name }}</span>
                                    </a>
    								@endif
    							  @endif
                                </p>
                            </div>
                            <div class="third-other-info font-14">
                                <div class="employ-exts float-l">
                                    <p>
                                        <span class="color-orange">{{ count($zn->exts)>0?$zn->exts->reading_num:0}}</span>
                                        <span class="color-3">阅读</span>&nbsp;|&nbsp;
                                        <span class="color-orange">{{ count($zn->exts)>0?$zn->exts->comment_num:0}}</span>
                                        <span class="color-3">评论</span>&nbsp;|&nbsp;
                                        <span class="color-orange">{{ count($zn->exts)>0?$zn->exts->recommond_num:0}}</span>
                                        <span class="color-3">收藏</span>
                                    </p>
                                    <p><span class="color-gray2">作者：{{$zn->user->name}}</span></p>
                                </div>
                                <div class="employ-user-icon float-r" @if(empty($authuser)) onclick="loginTips()" @elseif($authuser->id == $zn->user->id ) onclick="messageTips()" @else onclick="message('/message?ruid={{$zn->user->id}}','{{ csrf_token() }}')" @endif>
                                    <img src="{{userlogo($zn->user->id,'middle')}}" width="40">
                                </div>
                                <div class="clearfix"></div>
                            </div>
                        </div>
                    </div>
                    @endforeach
                    <div class="clearfix"></div>
                </div>
            </div>
            @endif
            @endforeach
        </div>
        <div class="employ-list-right employ-index-right float-r">
            <div class="employ-list-tips">
	           <div class="tips-title">人气热点</div>
	           @foreach($hotspot_news as $k=>$emphots)
	           <div class="tips-content @if($k>0) bodertop @endif">
	               <div class="tips-content-main">
    	               <div class="tips-content-title"><a href="{{url('/employ/'.$emphots->id)}}">{{str_limit($emphots->title,22)}}</a></div>
    	               <div class="tips-content-views">阅读（ {{ $emphots->exts->reading_num }} ）</div>
	               </div>
	           </div>
	           @endforeach
	       </div>
	       
	       @foreach ($ads_img as $key => $adimg)
	       <div class="employ-list-tips mt-10">
	           <img src="{{$adimg->attachment($adimg->id)->url}}">
	       </div>
	       @endforeach
        </div>
        <div class="clearfix"></div>
    </div>
    <div class="content margin-t-10">
        <div class="employ-search">
            <div class="employ-div-title">
				<span>热门公开课</span>
				<span class="more color-4 font-16">
					<a href="{{url('/teaches/list/1')}}">更多
						<i class="icon-circle font-16 more-circle">
						 <i class="icon-angle-right more-right"></i>
						</i>
					</a>
				</span>
            </div>
            <div class="employ-index-list">
                @foreach ($hotclass as $hclass)
                <div class="employ-open-class float-l">
                    <div class="employ-open-class-img">
                        <a href="{{ url('/teaches/'.$hclass->id) }}">
                            <img src="@if(count($hclass->attachment)>0){{ $hclass->attachment->url }}@else {{asset('/images/front/jyzn/4.png')}} @endif" alt="{{ str_limit($hclass->title, 30) }}" width="256" height="160">
                        </a>
                    </div>
                    <div class="employ-open-class-other mt-10">
                        <p class="open-title"><a href="{{ url('/teaches/'.$hclass->id) }}">{{ str_limit($hclass->name, 30) }}</a></p>
                        <p class="color-gray2 font-14">@if(empty($hclass->education)) 青苜学院 @else {{ $hclass->education }} @endif</p>
                        <p>
                            <img src="{{ asset('/images/front/little.png') }}">
                            <span class="color-orange font-12">{{$hclass->studys_num?:0}}</span><span class="color-gray2 font-12">在线学习</span>&nbsp;&nbsp;&nbsp;&nbsp;
                            <img src="{{ asset('/images/front/jyzn/c.png') }}">
                            <span class="color-gray2 font-12">{{$hclass->comments_num?:0}}</span>
                        </p>
                    </div>
                </div>
                @endforeach
                <div class="clearfix"></div>
            </div>
        </div>
    </div>
</div>
@stop

@section('footer')
	@parent
@stop